crates-index 0.17.0

Library for retrieving and interacting with the crates.io index
Documentation

rust-crates-index

crates-index on Crates.io

Library for retrieving and interacting with the crates.io registry git-based index.

Documentation

Example

let index = crates_index::Index::new("index_checkout");
if !index.exists() {
    index.retrieve().expect("Could not retrieve crates.io index");
}
for crate_releases in index.crates() {
    let _ = crate_releases.latest_version(); // any version most recently published
    let crate_version = crate_releases.highest_version(); // max version by semver
    println!("crate name: {}", crate_version.name());
    println!("crate version: {}", crate_version.version());
}

Similar crates

License

Licensed under version 2 of the Apache License